<?php
/**
 * Created by laoyu.
 * User: hilaoyu@qq.com
 * Date: 2018/5/22
 * Time: 17:11
 */

namespace Hilaoyu\LaravelExtend\Providers;

use Illuminate\Support\ServiceProvider as BaseServiceProvider;
use Illuminate\Translation\Translator;
use Hilaoyu\LaravelExtend\Services\Validator\Redefinition\Validator;

class ValidationExtendServiceProvider extends BaseServiceProvider
{
    public function boot()
    {
        $this->app['validator']->resolver(function (Translator $translator, array $data, array $rules, array $messages = [], array $customAttributes = []) {
            return new Validator($translator, $data, $rules, $messages, $customAttributes);
        });
    }

    /**
     * Register any application services.
     *
     * @return void
     */
    public function register()
    {

    }
}
